package taller2.view.windows;

import taller2.controller.listeners.UserImputListener;
import taller2.interfaces.HidableWindow;
import taller2.utils.Constants;
import taller2.utils.Point;
import taller2.view.menus.UserImputMenu;

public class UserImputWindow implements HidableWindow {

	private MyWindow window;
	private UserImputMenu menu;
	
	// constructor
	public UserImputWindow(String req, String req2, String InitialResp, String solution, UserImputListener listener) {
		this.window = new MyWindow("userImputWindow");
		this.menu = new UserImputMenu(this,req,req2,InitialResp,solution,listener);
	
		this.window.addComponent(menu, 1, 1, new Point(0, 0));
		this.window.changeSize(Constants.tamImputMenuX,Constants.tamImputMenuY);
		this.window.hideOnClose();
	}
	
	// redraws the window
	public void redraw() {
		window.redraw();
	}
	
    // closes the window
    public void close(){
    	window.setVisible(false);
    }

	@Override
	public void setVisible(boolean b) {
		window.setVisible(b);
	}


}
